package org.lanqiao.decorator;

import org.junit.Test;

public class TestBeverage {
	@Test
	public void Test() {
		Beverage beverage = new DarkRoast(Beverage.MIDDLE);
		System.out.println(beverage.getdecription()+"  $  "+beverage.cost());
		
		beverage=new Milk(beverage);
		System.out.println(beverage.getdecription()+"  $  "+beverage.cost());

		beverage=new Mocha(beverage);
		System.out.println(beverage.getdecription()+"  $  "+beverage.cost());
		beverage=new Soy(beverage);
		System.out.println(beverage.getdecription()+"  $  "+beverage.cost());
		beverage=new Whip(beverage);
		System.out.println(beverage.getdecription()+"  $  "+beverage.cost());
		
		
		beverage=new Mocha(new Milk(new DarkRoast(Beverage.MIDDLE)));
		System.out.println(beverage.getdecription()+"  $  "+beverage.cost());
		
	}
}
